/**
 */
package gatperdut.chato.model.Chato.impl;

import gatperdut.chato.model.Chato.Chato;
import gatperdut.chato.model.Chato.ChatoFactory;
import gatperdut.chato.model.Chato.ChatoPackage;
import gatperdut.chato.model.Chato.Constant.ConstantPackage;
import gatperdut.chato.model.Chato.Constant.impl.ConstantPackageImpl;
import gatperdut.chato.model.Chato.Container.ContainerPackage;
import gatperdut.chato.model.Chato.Container.impl.ContainerPackageImpl;
import gatperdut.chato.model.Chato.Craft.CraftPackage;
import gatperdut.chato.model.Chato.Craft.impl.CraftPackageImpl;
import gatperdut.chato.model.Chato.Entity.EntityPackage;
import gatperdut.chato.model.Chato.Entity.Skill.SkillPackage;
import gatperdut.chato.model.Chato.Entity.Skill.impl.SkillPackageImpl;
import gatperdut.chato.model.Chato.Entity.impl.EntityPackageImpl;
import gatperdut.chato.model.Chato.Item.ItemPackage;
import gatperdut.chato.model.Chato.Item.impl.ItemPackageImpl;
import gatperdut.chato.model.Chato.Player.PlayerPackage;
import gatperdut.chato.model.Chato.Player.impl.PlayerPackageImpl;
import gatperdut.chato.model.Chato.Room.RoomPackage;
import gatperdut.chato.model.Chato.Room.impl.RoomPackageImpl;
import gatperdut.chato.model.Chato.Util.UtilPackage;
import gatperdut.chato.model.Chato.Util.impl.UtilPackageImpl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class ChatoPackageImpl extends EPackageImpl implements ChatoPackage {
	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass chatoEClass = null;

	/**
     * Creates an instance of the model <b>Package</b>, registered with
     * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
     * package URI value.
     * <p>Note: the correct way to create the package is via the static
     * factory method {@link #init init()}, which also performs
     * initialization of the package, or returns the registered package,
     * if one already exists.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see org.eclipse.emf.ecore.EPackage.Registry
     * @see gatperdut.chato.model.Chato.ChatoPackage#eNS_URI
     * @see #init()
     * @generated
     */
	private ChatoPackageImpl() {
        super(eNS_URI, ChatoFactory.eINSTANCE);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private static boolean isInited = false;

	/**
     * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
     * 
     * <p>This method is used to initialize {@link ChatoPackage#eINSTANCE} when that field is accessed.
     * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #eNS_URI
     * @see #createPackageContents()
     * @see #initializePackageContents()
     * @generated
     */
	public static ChatoPackage init() {
        if (isInited) return (ChatoPackage)EPackage.Registry.INSTANCE.getEPackage(ChatoPackage.eNS_URI);

        // Obtain or create and register package
        ChatoPackageImpl theChatoPackage = (ChatoPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ChatoPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ChatoPackageImpl());

        isInited = true;

        // Obtain or create and register interdependencies
        PlayerPackageImpl thePlayerPackage = (PlayerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI) instanceof PlayerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI) : PlayerPackage.eINSTANCE);
        EntityPackageImpl theEntityPackage = (EntityPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) instanceof EntityPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) : EntityPackage.eINSTANCE);
        SkillPackageImpl theSkillPackage = (SkillPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) instanceof SkillPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) : SkillPackage.eINSTANCE);
        RoomPackageImpl theRoomPackage = (RoomPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI) instanceof RoomPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI) : RoomPackage.eINSTANCE);
        ItemPackageImpl theItemPackage = (ItemPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI) instanceof ItemPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI) : ItemPackage.eINSTANCE);
        ConstantPackageImpl theConstantPackage = (ConstantPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI) instanceof ConstantPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI) : ConstantPackage.eINSTANCE);
        ContainerPackageImpl theContainerPackage = (ContainerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) instanceof ContainerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) : ContainerPackage.eINSTANCE);
        CraftPackageImpl theCraftPackage = (CraftPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) instanceof CraftPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) : CraftPackage.eINSTANCE);
        UtilPackageImpl theUtilPackage = (UtilPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) instanceof UtilPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) : UtilPackage.eINSTANCE);

        // Create package meta-data objects
        theChatoPackage.createPackageContents();
        thePlayerPackage.createPackageContents();
        theEntityPackage.createPackageContents();
        theSkillPackage.createPackageContents();
        theRoomPackage.createPackageContents();
        theItemPackage.createPackageContents();
        theConstantPackage.createPackageContents();
        theContainerPackage.createPackageContents();
        theCraftPackage.createPackageContents();
        theUtilPackage.createPackageContents();

        // Initialize created meta-data
        theChatoPackage.initializePackageContents();
        thePlayerPackage.initializePackageContents();
        theEntityPackage.initializePackageContents();
        theSkillPackage.initializePackageContents();
        theRoomPackage.initializePackageContents();
        theItemPackage.initializePackageContents();
        theConstantPackage.initializePackageContents();
        theContainerPackage.initializePackageContents();
        theCraftPackage.initializePackageContents();
        theUtilPackage.initializePackageContents();

        // Mark meta-data to indicate it can't be changed
        theChatoPackage.freeze();

  
        // Update the registry and return the package
        EPackage.Registry.INSTANCE.put(ChatoPackage.eNS_URI, theChatoPackage);
        return theChatoPackage;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getChato() {
        return chatoEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getChato_ItemContainer() {
        return (EReference)chatoEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getChato_ItemTemplateContainer() {
        return (EReference)chatoEClass.getEStructuralFeatures().get(1);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getChato_RoomContainer() {
        return (EReference)chatoEClass.getEStructuralFeatures().get(2);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getChato_PlayerContainer() {
        return (EReference)chatoEClass.getEStructuralFeatures().get(3);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getChato_DoorContainer() {
        return (EReference)chatoEClass.getEStructuralFeatures().get(4);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getChato_BotContainer() {
        return (EReference)chatoEClass.getEStructuralFeatures().get(5);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getChato_CraftContainer() {
        return (EReference)chatoEClass.getEStructuralFeatures().get(6);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public ChatoFactory getChatoFactory() {
        return (ChatoFactory)getEFactoryInstance();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isCreated = false;

	/**
     * Creates the meta-model objects for the package.  This method is
     * guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void createPackageContents() {
        if (isCreated) return;
        isCreated = true;

        // Create classes and their features
        chatoEClass = createEClass(CHATO);
        createEReference(chatoEClass, CHATO__ITEM_CONTAINER);
        createEReference(chatoEClass, CHATO__ITEM_TEMPLATE_CONTAINER);
        createEReference(chatoEClass, CHATO__ROOM_CONTAINER);
        createEReference(chatoEClass, CHATO__PLAYER_CONTAINER);
        createEReference(chatoEClass, CHATO__DOOR_CONTAINER);
        createEReference(chatoEClass, CHATO__BOT_CONTAINER);
        createEReference(chatoEClass, CHATO__CRAFT_CONTAINER);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isInitialized = false;

	/**
     * Complete the initialization of the package and its meta-model.  This
     * method is guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void initializePackageContents() {
        if (isInitialized) return;
        isInitialized = true;

        // Initialize package
        setName(eNAME);
        setNsPrefix(eNS_PREFIX);
        setNsURI(eNS_URI);

        // Obtain other dependent packages
        PlayerPackage thePlayerPackage = (PlayerPackage)EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI);
        EntityPackage theEntityPackage = (EntityPackage)EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI);
        RoomPackage theRoomPackage = (RoomPackage)EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI);
        ItemPackage theItemPackage = (ItemPackage)EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI);
        ConstantPackage theConstantPackage = (ConstantPackage)EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI);
        ContainerPackage theContainerPackage = (ContainerPackage)EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI);
        CraftPackage theCraftPackage = (CraftPackage)EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI);
        UtilPackage theUtilPackage = (UtilPackage)EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI);

        // Add subpackages
        getESubpackages().add(thePlayerPackage);
        getESubpackages().add(theEntityPackage);
        getESubpackages().add(theRoomPackage);
        getESubpackages().add(theItemPackage);
        getESubpackages().add(theConstantPackage);
        getESubpackages().add(theContainerPackage);
        getESubpackages().add(theCraftPackage);
        getESubpackages().add(theUtilPackage);

        // Create type parameters

        // Set bounds for type parameters

        // Add supertypes to classes

        // Initialize classes, features, and operations; add parameters
        initEClass(chatoEClass, Chato.class, "Chato", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getChato_ItemContainer(), theContainerPackage.getItemContainer(), null, "itemContainer", null, 1, 1, Chato.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getChato_ItemTemplateContainer(), theContainerPackage.getItemTemplateContainer(), null, "itemTemplateContainer", null, 1, 1, Chato.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getChato_RoomContainer(), theContainerPackage.getRoomContainer(), null, "roomContainer", null, 1, 1, Chato.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getChato_PlayerContainer(), theContainerPackage.getPlayerContainer(), null, "playerContainer", null, 1, 1, Chato.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getChato_DoorContainer(), theContainerPackage.getDoorContainer(), null, "doorContainer", null, 1, 1, Chato.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getChato_BotContainer(), theContainerPackage.getBotContainer(), null, "botContainer", null, 1, 1, Chato.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getChato_CraftContainer(), theContainerPackage.getCraftContainer(), null, "craftContainer", null, 1, 1, Chato.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        // Create resource
        createResource(eNS_URI);
    }

} //ChatoPackageImpl
